﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Toulr.Domains.Account;
using Toulr.Domains.System;

#endregion

namespace Toulr.Domains.Business
{
    public class Shop : IEntity
    {
        #region Property

        /// <summary>
        /// 店铺ID 主键 自动标识
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 店铺名称
        /// </summary>
        [MaxLength(128)]
        [Required]
        public string ShopName { get; set; }

        /// <summary>
        /// 店主ID
        /// </summary>
        public int ShopKeeperId { get; set; }

        /// <summary>
        /// 当前店长ID
        /// </summary>
        public int ShopManagerId { get; set; }

        /// <summary>
        /// 店铺类型ID
        /// </summary>
        [Required]
        public int ShopCategoryId { get; set; }

        /// <summary>
        ///   店铺描述
        /// </summary>
        [MaxLength(1024)]
        [Required]
        public string Description { get; set; }

        /// <summary>
        ///   店铺加入时间
        /// </summary>
        public DateTime? JoinTime { get; set; }

        /// <summary>
        ///   店铺所在地址
        /// </summary>
        [MaxLength(250)]
        [Required]
        public String Address { get; set; }

        /// <summary>
        ///   店铺交通方式
        /// </summary>
        [MaxLength(300)]
        public String Traffics { get; set; }

        /// <summary>
        ///   店铺营业时间说明
        /// </summary>
        [MaxLength(120)]
        public String OpenTime { get; set; }

        /// <summary>
        ///   店铺邮编
        /// </summary>
        public int PostCode { get; set; }

        /// <summary>
        /// 店铺所属城市ID
        /// </summary>
        [Required]
        public int CityId { get; set; }

        /// <summary>
        /// 店铺所属区县ID
        /// </summary>
        public int CountyId { get; set; }

        /// <summary>
        /// 店铺所属商圈ID
        /// </summary>
        public int ShoppingAreaId { get; set; }

        /// <summary>
        ///   商铺特色描述
        /// </summary>
        [MaxLength(300)]
        public String Features { get; set; }

        /// <summary>
        ///   店铺许可证编号
        /// </summary>
        [MaxLength(120)]
        public String BizLicense { get; set; }

        /// <summary>
        ///   许可编号提交时间
        /// </summary>
        public DateTime? LicenseCommitTime { get; set; }

        /// <summary>
        ///   店铺是否已验证
        /// </summary>
        public bool Certified { get; set; }

        /// <summary>
        ///   验证时间
        /// </summary>
        public DateTime CertifiedTime { get; set; }

        /// <summary>
        ///   经度
        /// </summary>
        public float Longitude { get; set; }

        /// <summary>
        ///   维度
        /// </summary>
        public float Latitude { get; set; }

        /// <summary>
        /// 店铺状态标识 
        /// 1为营业中
        /// 2新添加店铺待验证状态 
        /// 3为未验证通过状态
        /// 4停业状态
        /// 99为其它
        /// </summary>
        public int ShopFlag { get; set; }

        #endregion

        #region Association Objects

        /// <summary>
        ///   店主
        /// </summary>
        [NotMapped]
        public virtual User ShopKeeper
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   当前店长
        /// </summary>
        [NotMapped]
        public virtual User ShopManager
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   店铺类型
        /// </summary>
        [NotMapped]
        public virtual InfoCategories ShopCategory
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   店铺所处城市
        /// </summary>
        [NotMapped]
        public virtual City City
        {
            get { throw new NotImplementedException(); }
        }


        /// <summary>
        ///   店铺所属区县
        /// </summary>
        [NotMapped]
        public virtual Counties County
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   店铺所处商圈
        /// </summary>
        [NotMapped]
        public virtual ShoppingArea ShoppingArea
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        /// 店铺扩展属性列表
        /// </summary>
        [NotMapped]
        public virtual ICollection<ShopProperty> ShopPropertys
        {
            get { throw new NotImplementedException(); }
        }

        [NotMapped]
        public virtual ShopEvaluation ShopEvaluation
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}